package com.pkk.penguin.frame.know.java.driven.ext.listener.listener;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 自定义事件监听
 *
 * @author peikunkun
 * @version V1.0
 * @date 2020-11-14 18:07
 **/
@Component
public class MyApplicationListener implements ApplicationListener<ApplicationEvent> {

  /**
   * Handle an application event.
   *
   * @param event the event to respond to
   */
  @Override
  public void onApplicationEvent(ApplicationEvent event) {
    System.out.println(this.getClass().getSimpleName() + "【********3】收到事件:" + event);
  }
}
